<template>
	<view class="content">
		<!-- F1: 状态栏 -->
		<myStatusbar />
		<!-- F2: 自定义导航栏 -->
		<uni-nav-bar
			title="缴费"
			leftIcon="back"
			leftText="返回"
			rightIcon="list"
			backgroundColor="#090"
			color="#FFF"
			@clickLeft="goBack"
		/>
		<!-- F3: 输入缴费金额 -->
		<uni-list class="list-amount">
			<uni-list-item
				:title="type | feeType"
				:thumb="type | feeTypeIcon"
				thumbSize="lg"
			>
				<template v-slot:footer>
					<view class="footer-amount">
						<input type="digit" placeholder="请输入缴费金额" />
						<text>元</text>
					</view>
				</template>
			</uni-list-item>
		</uni-list>
		<!-- F4: 缴费详情 -->
		<uni-list class="list-detail">
			<uni-list-item
				title="缴费单位"
				rightText="请选择缴费单位"
				:showArrow="true"
			></uni-list-item>
			<uni-list-item
				title="用户编号"
			>
				<template v-slot:footer>
					<input class="user-id" type="text" placeholder="请输入缴费编号" />
				</template>
			</uni-list-item>
			<uni-list-item
				title="户名"
				rightText="张三"
			></uni-list-item>
			<uni-list-item
				title="用户地址"
				rightText="北京市海淀区xxx"
			></uni-list-item>
		</uni-list>
		<!-- F5: 提交按钮 -->
		<view class="submit">
			<text class="btn">提交</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: 0, //保存传递的缴费类型
			}
		},
		onLoad({type}) {
			console.log(type)
			// 保存传递类型到数据中
			this.type = type
		},
		methods: {
			goBack() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.uni-navbar {
		display: block;
		// ::v-deep 样式穿透
		::v-deep .uni-navbar__content {
			display: block;
		}
	}
	.list-amount{
		margin-top: $uni-spacing-col-base;
		.footer-amount {
			align-items: center;
			input {
				font-size: $uni-font-size-base;
				text-align: right;
				margin-right: $uni-spacing-row-base;
			}
		}
	}
	
	.list-detail {
		margin-top: $uni-spacing-col-base;
		.user-id {
			text-align: right;
			font-size: $uni-font-size-sm;
		}
	}
	.submit {
		margin: $uni-spacing-col-lg*3 $uni-spacing-row-lg;
		.btn {
			width: 100%;
			background-color: $zh-theme-color;
			color: $zh-theme-color-inverse;
			padding: $uni-spacing-col-base 0;
			text-align: center;
			border-radius: $uni-border-radius-base;
		}
	}
	
</style>
